﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TMV.DTO
{

	public class ResultInfo
	{
		/// <summary>
		/// 错误码
		/// </summary>
		public string Error { get; set; }
		/// <summary>
		///  返回消息
		/// </summary>
		public string Message { get; set; }
	}

	public class ResultInfoUtil
	{

		public ResultInfo Success(string message = "操作成功")
		{
			return new ResultInfo
			{
				Error = "0",
				Message = message
			};
		}
		public ResultInfo Failure(string error, string message)
		{
			return new ResultInfo
			{
				Error = error,
				Message = message
			};
		}
	}
}
